<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcss.com/vue/2.4.2/vue.js"></script>
</head>
<body>
<div id="app">
    <p>{{message}}</p>
    <button v-on:click="reverseMessage">点击翻转</button>
    <button @click="reverseMessage">再点击翻转</button>

    <a @click="malert" href="javascript:;">弹窗</a>
</div>
<script>
    new Vue({
        el : "#app",
        data : {
            message : "hello word!"
        },
        methods:{
            reverseMessage : function () {
                this.message = this.message.split('').reverse().join('')
            },
            malert : function () {
                alert('你好');
                return false;
            }
        }
    })
</script>
</body>
</html>